<style type="text/css">
    .layui-table-body {
        overflow-x: auto;
    }

    .layui-table-cell {
        font-size: 12px;
    }
</style>
<div class="page-toolbar">
    <div class="page-filter fr">
        <form class="layui-form layui-form-pane" action="{:url()}" id="hisiSearch" method="get">
            <div class="layui-form-item">
                <label class="layui-form-label">搜索</label>
                <div class="layui-input-inline">
                    <input type="text" name="keyword" value="" lay-verify="required" placeholder="用户账号" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
        </form>
    </div>
    <div class="layui-btn-group fl">
        <!--<a href="{:url('createGroup')}" class="layui-btn layui-btn-primary layui-icon layui-icon-add-circle-fine">&nbsp;添加</a>-->
        <!--<a data-href="{:url('status?table=admin_member&val=1')}"
           class="layui-btn layui-btn-primary j-page-btns layui-icon layui-icon-play" data-table="dataTable">
            &nbsp;启用</a>
        <a data-href="{:url('status?table=admin_member&val=0')}"
           class="layui-btn layui-btn-primary j-page-btns layui-icon layui-icon-pause" data-table="dataTable">
            &nbsp;禁用</a>
        <a data-href="{:url('del?table=admin_member')}"
           class="layui-btn layui-btn-primary j-page-btns confirm layui-icon layui-icon-close red">&nbsp;删除</a>-->
    </div>
</div>
<form id="pageListForm">
    <div class="layui-form">
        <table id="dataTable"></table>
        <script type="text/html" title="操作按钮模板" id="buttonTpl">
            {{# if(d.status==1){ }}
            <a href="{:url('checkWithdraw')}?id={{ d.id }}&type=2"
               class="layui-btn layui-btn-xs layui-btn-normal">通过</a>
            <a href="{:url('toBack')}?id={{ d.id }}&table=group" class="layui-btn layui-btn-xs layui-btn-danger">驳回</a>
            {{#  } else if(d.status==4){ }}
            <a href="{:url('refreshWithdraw')}?id={{ d.id }}"
               class="layui-btn layui-btn-xs layui-btn-normal">刷新</a>
            {{#  } else if(d.status==5){ }}
            <a href="{:url('resend')}?id={{ d.id }}&type=2"
               class="layui-btn layui-btn-xs layui-btn-normal">重发</a>
            <a href="{:url('toBack')}?id={{ d.id }}&table=group" class="layui-btn layui-btn-xs layui-btn-danger">驳回</a>
            {{# } }}
        </script>
    </div>
</form>
{include file="block/layui" /}
<script type="text/javascript">
    layui.use(['table'], function () {
        var table = layui.table;
        table.render({
            elem: '#dataTable'
            , url: '{:url()}' //数据接口
            , page: true //开启分页
            , limit: 20
            , text: {
                none: '暂无相关数据'
            }
            , cols: [[ //表头
                {type: 'checkbox'}
                , {field: 'id', title: '交易ID', width: 80}
                , {field: 'uid', title: '用户ID', width: 80}
                , {
                    field: 'nick', title: '昵称', width: 120
                }
                , {
                    field: 'mobile', title: '用户账号', width: 120
                }
                , {field: 'currency_name', title: '币种名称', width: 120}
                , {field: 'to', title: '提现地址'}
                , {field: 'number', title: '提现数量'}
                , {field: 'fee', title: '提现手续费'}
                , {
                    field: 'status', title: '状态', templet: function (d) {
                        if (d.status == 1) {
                            return "待审核";
                        } else if (d.status == 2) {
                            return "成功";
                        } else if (d.status == 3) {
                            return "已驳回";
                        }
                        else if (d.status == 4) {
                            return "处理中";
                        } else {
                            return "失败";
                        }
                    }
                }
                ,
                {
                    field: 'ctime', title: '提现时间'
                }
                ,
                {
                    field: 'status', title: '状态', templet: '#buttonTpl'
                }

            ]]
        });
    })
    ;
</script>